home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / SourceCode / LispExample / Lisp.h < prev    next >
Text File  |  1995-06-12  |  1KB  |  57 lines

  1. /*
  2. **    Lisp.h
  3. **    Lisp client object with message-based I/O.
  4. **    Lee Boynton, NeXT, Inc., 1989
  5. */
  6.  
  7.  
  8. #import <objc/Object.h>
  9.  
  10. @interface Lisp : Object
  11. {
  12.     id delegate;
  13.     int lisp_pid;
  14.     int lisp_in_fd;
  15.     int lisp_out_fd;
  16. }
  17.  
  18. + new;
  19. - free;
  20.     /*
  21.     ** The new method launches the lisp process determined by the
  22.     ** 'LispImage' default (which itself defaults to 'cl'). If multiple
  23.     ** Lisp objects are created, each one has a new lisp process.
  24.     ** If any error occurs, nil is returned.
  25.     ** When the Lisp object is freed, the lisp process is killed.
  26.     */
  27.  
  28. - setDelegate:anObject;
  29. - delegate;
  30.     /*
  31.     ** Sets/gets the delegate of the Lisp object. The delegate will receive
  32.     ** lispOutput: message whenever the lisp process outputs to stdout or
  33.     ** stderr.
  34.     */
  35.  
  36. - inputLisp:(const char *)theString;
  37.     /*
  38.     ** Enqueue the string onto the lisp process's stdin.
  39.     */
  40.  
  41. - interruptLisp;
  42.     /*
  43.     ** Send a 'keyboard interrupt' signal to the lisp process.
  44.     */
  45.  
  46. @end
  47.  
  48.  
  49. @interface LispDelegate
  50.  
  51. - lispOutput:(const char *)theString;
  52. @end
  53.  
  54.  
  55.  
  56.  
  57.